3.8.4 \(\int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^8} \, dx\) [704]

3.8.4.1 Optimal result
3.8.4.2 Mathematica [A] (verified)
3.8.4.3 Rubi [A] (verified)
3.8.4.4 Maple [A] (verified)
3.8.4.5 Fricas [A] (verification not implemented)
3.8.4.6 Sympy [B] (verification not implemented)
3.8.4.7 Maxima [F(-2)]
3.8.4.8 Giac [B] (verification not implemented)
3.8.4.9 Mupad [B] (verification not implemented)

3.8.4.1 Optimal result

Integrand size = 41, antiderivative size = 127 \[ \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^8} \, dx=-\frac {a^3 (i A+B)}{2 c^8 f (i+\tan (e+f x))^8}+\frac {4 a^3 (A-2 i B)}{7 c^8 f (i+\tan (e+f x))^7}+\frac {a^3 (i A+5 B)}{6 c^8 f (i+\tan (e+f x))^6}+\frac {i a^3 B}{5 c^8 f (i+\tan (e+f x))^5} \]

output
-1/2*a^3*(I*A+B)/c^8/f/(I+tan(f*x+e))^8+4/7*a^3*(A-2*I*B)/c^8/f/(I+tan(f*x 
+e))^7+1/6*a^3*(I*A+5*B)/c^8/f/(I+tan(f*x+e))^6+1/5*I*a^3*B/c^8/f/(I+tan(f 
*x+e))^5
 
3.8.4.2 Mathematica [A] (verified)

Time = 5.55 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.66 \[ \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^8} \, dx=\frac {a^3 \left (2 (-10 i A+B)+2 (25 A-8 i B) \tan (e+f x)+7 (5 i A+7 B) \tan ^2(e+f x)+42 i B \tan ^3(e+f x)\right )}{210 c^8 f (i+\tan (e+f x))^8} \]

input
Integrate[((a + I*a*Tan[e + f*x])^3*(A + B*Tan[e + f*x]))/(c - I*c*Tan[e + 
 f*x])^8,x]
 
output
(a^3*(2*((-10*I)*A + B) + 2*(25*A - (8*I)*B)*Tan[e + f*x] + 7*((5*I)*A + 7 
*B)*Tan[e + f*x]^2 + (42*I)*B*Tan[e + f*x]^3))/(210*c^8*f*(I + Tan[e + f*x 
])^8)
 
3.8.4.3 Rubi [A] (verified)

Time = 0.35 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.80, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {3042, 4071, 27, 86, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^8} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^8}dx\)

\(\Big \downarrow \) 4071

\(\displaystyle \frac {a c \int \frac {a^2 (i \tan (e+f x)+1)^2 (A+B \tan (e+f x))}{c^9 (1-i \tan (e+f x))^9}d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {a^3 \int \frac {(i \tan (e+f x)+1)^2 (A+B \tan (e+f x))}{(1-i \tan (e+f x))^9}d\tan (e+f x)}{c^8 f}\)

\(\Big \downarrow \) 86

\(\displaystyle \frac {a^3 \int \left (-\frac {4 (A-2 i B)}{(\tan (e+f x)+i)^8}-\frac {i B}{(\tan (e+f x)+i)^6}-\frac {i (A-5 i B)}{(\tan (e+f x)+i)^7}+\frac {4 (i A+B)}{(\tan (e+f x)+i)^9}\right )d\tan (e+f x)}{c^8 f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a^3 \left (\frac {4 (A-2 i B)}{7 (\tan (e+f x)+i)^7}+\frac {5 B+i A}{6 (\tan (e+f x)+i)^6}-\frac {B+i A}{2 (\tan (e+f x)+i)^8}+\frac {i B}{5 (\tan (e+f x)+i)^5}\right )}{c^8 f}\)

input
Int[((a + I*a*Tan[e + f*x])^3*(A + B*Tan[e + f*x]))/(c - I*c*Tan[e + f*x]) 
^8,x]
 
output
(a^3*(-1/2*(I*A + B)/(I + Tan[e + f*x])^8 + (4*(A - (2*I)*B))/(7*(I + Tan[ 
e + f*x])^7) + (I*A + 5*B)/(6*(I + Tan[e + f*x])^6) + ((I/5)*B)/(I + Tan[e 
 + f*x])^5))/(c^8*f)
 

3.8.4.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 86
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ 
.), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; 
 FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 
] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p 
+ 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4071
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + 
 (f_.)*(x_)])*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Si 
mp[a*(c/f)   Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x], x 
, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c 
+ a*d, 0] && EqQ[a^2 + b^2, 0]
 
3.8.4.4 Maple [A] (verified)

Time = 0.28 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.71

method result size
derivativedivides \(\frac {a^{3} \left (-\frac {8 i B -4 A}{7 \left (i+\tan \left (f x +e \right )\right )^{7}}-\frac {-i A -5 B}{6 \left (i+\tan \left (f x +e \right )\right )^{6}}+\frac {i B}{5 \left (i+\tan \left (f x +e \right )\right )^{5}}-\frac {4 i A +4 B}{8 \left (i+\tan \left (f x +e \right )\right )^{8}}\right )}{f \,c^{8}}\) \(90\)
default \(\frac {a^{3} \left (-\frac {8 i B -4 A}{7 \left (i+\tan \left (f x +e \right )\right )^{7}}-\frac {-i A -5 B}{6 \left (i+\tan \left (f x +e \right )\right )^{6}}+\frac {i B}{5 \left (i+\tan \left (f x +e \right )\right )^{5}}-\frac {4 i A +4 B}{8 \left (i+\tan \left (f x +e \right )\right )^{8}}\right )}{f \,c^{8}}\) \(90\)
risch \(-\frac {a^{3} {\mathrm e}^{16 i \left (f x +e \right )} B}{512 c^{8} f}-\frac {i a^{3} {\mathrm e}^{16 i \left (f x +e \right )} A}{512 c^{8} f}-\frac {3 \,{\mathrm e}^{14 i \left (f x +e \right )} B \,a^{3}}{448 c^{8} f}-\frac {5 i {\mathrm e}^{14 i \left (f x +e \right )} a^{3} A}{448 c^{8} f}-\frac {{\mathrm e}^{12 i \left (f x +e \right )} B \,a^{3}}{192 c^{8} f}-\frac {5 i {\mathrm e}^{12 i \left (f x +e \right )} a^{3} A}{192 c^{8} f}+\frac {{\mathrm e}^{10 i \left (f x +e \right )} B \,a^{3}}{160 c^{8} f}-\frac {i {\mathrm e}^{10 i \left (f x +e \right )} a^{3} A}{32 c^{8} f}+\frac {3 \,{\mathrm e}^{8 i \left (f x +e \right )} B \,a^{3}}{256 c^{8} f}-\frac {5 i {\mathrm e}^{8 i \left (f x +e \right )} a^{3} A}{256 c^{8} f}+\frac {a^{3} {\mathrm e}^{6 i \left (f x +e \right )} B}{192 c^{8} f}-\frac {i a^{3} {\mathrm e}^{6 i \left (f x +e \right )} A}{192 c^{8} f}\) \(260\)

input
int((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))^8,x,method=_R 
ETURNVERBOSE)
 
output
1/f*a^3/c^8*(-1/7*(8*I*B-4*A)/(I+tan(f*x+e))^7-1/6*(-I*A-5*B)/(I+tan(f*x+e 
))^6+1/5*I*B/(I+tan(f*x+e))^5-1/8*(4*I*A+4*B)/(I+tan(f*x+e))^8)
 
3.8.4.5 Fricas [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.03 \[ \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^8} \, dx=-\frac {105 \, {\left (i \, A + B\right )} a^{3} e^{\left (16 i \, f x + 16 i \, e\right )} + 120 \, {\left (5 i \, A + 3 \, B\right )} a^{3} e^{\left (14 i \, f x + 14 i \, e\right )} + 280 \, {\left (5 i \, A + B\right )} a^{3} e^{\left (12 i \, f x + 12 i \, e\right )} + 336 \, {\left (5 i \, A - B\right )} a^{3} e^{\left (10 i \, f x + 10 i \, e\right )} + 210 \, {\left (5 i \, A - 3 \, B\right )} a^{3} e^{\left (8 i \, f x + 8 i \, e\right )} + 280 \, {\left (i \, A - B\right )} a^{3} e^{\left (6 i \, f x + 6 i \, e\right )}}{53760 \, c^{8} f} \]

input
integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))^8,x, al 
gorithm="fricas")
 
output
-1/53760*(105*(I*A + B)*a^3*e^(16*I*f*x + 16*I*e) + 120*(5*I*A + 3*B)*a^3* 
e^(14*I*f*x + 14*I*e) + 280*(5*I*A + B)*a^3*e^(12*I*f*x + 12*I*e) + 336*(5 
*I*A - B)*a^3*e^(10*I*f*x + 10*I*e) + 210*(5*I*A - 3*B)*a^3*e^(8*I*f*x + 8 
*I*e) + 280*(I*A - B)*a^3*e^(6*I*f*x + 6*I*e))/(c^8*f)
 
3.8.4.6 Sympy [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 496 vs. \(2 (104) = 208\).

Time = 0.72 (sec) , antiderivative size = 496, normalized size of antiderivative = 3.91 \[ \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^8} \, dx=\begin {cases} \frac {\left (- 1803886264320 i A a^{3} c^{40} f^{5} e^{6 i e} + 1803886264320 B a^{3} c^{40} f^{5} e^{6 i e}\right ) e^{6 i f x} + \left (- 6764573491200 i A a^{3} c^{40} f^{5} e^{8 i e} + 4058744094720 B a^{3} c^{40} f^{5} e^{8 i e}\right ) e^{8 i f x} + \left (- 10823317585920 i A a^{3} c^{40} f^{5} e^{10 i e} + 2164663517184 B a^{3} c^{40} f^{5} e^{10 i e}\right ) e^{10 i f x} + \left (- 9019431321600 i A a^{3} c^{40} f^{5} e^{12 i e} - 1803886264320 B a^{3} c^{40} f^{5} e^{12 i e}\right ) e^{12 i f x} + \left (- 3865470566400 i A a^{3} c^{40} f^{5} e^{14 i e} - 2319282339840 B a^{3} c^{40} f^{5} e^{14 i e}\right ) e^{14 i f x} + \left (- 676457349120 i A a^{3} c^{40} f^{5} e^{16 i e} - 676457349120 B a^{3} c^{40} f^{5} e^{16 i e}\right ) e^{16 i f x}}{346346162749440 c^{48} f^{6}} & \text {for}\: c^{48} f^{6} \neq 0 \\\frac {x \left (A a^{3} e^{16 i e} + 5 A a^{3} e^{14 i e} + 10 A a^{3} e^{12 i e} + 10 A a^{3} e^{10 i e} + 5 A a^{3} e^{8 i e} + A a^{3} e^{6 i e} - i B a^{3} e^{16 i e} - 3 i B a^{3} e^{14 i e} - 2 i B a^{3} e^{12 i e} + 2 i B a^{3} e^{10 i e} + 3 i B a^{3} e^{8 i e} + i B a^{3} e^{6 i e}\right )}{32 c^{8}} & \text {otherwise} \end {cases} \]

input
integrate((a+I*a*tan(f*x+e))**3*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))**8,x)
 
output
Piecewise((((-1803886264320*I*A*a**3*c**40*f**5*exp(6*I*e) + 1803886264320 
*B*a**3*c**40*f**5*exp(6*I*e))*exp(6*I*f*x) + (-6764573491200*I*A*a**3*c** 
40*f**5*exp(8*I*e) + 4058744094720*B*a**3*c**40*f**5*exp(8*I*e))*exp(8*I*f 
*x) + (-10823317585920*I*A*a**3*c**40*f**5*exp(10*I*e) + 2164663517184*B*a 
**3*c**40*f**5*exp(10*I*e))*exp(10*I*f*x) + (-9019431321600*I*A*a**3*c**40 
*f**5*exp(12*I*e) - 1803886264320*B*a**3*c**40*f**5*exp(12*I*e))*exp(12*I* 
f*x) + (-3865470566400*I*A*a**3*c**40*f**5*exp(14*I*e) - 2319282339840*B*a 
**3*c**40*f**5*exp(14*I*e))*exp(14*I*f*x) + (-676457349120*I*A*a**3*c**40* 
f**5*exp(16*I*e) - 676457349120*B*a**3*c**40*f**5*exp(16*I*e))*exp(16*I*f* 
x))/(346346162749440*c**48*f**6), Ne(c**48*f**6, 0)), (x*(A*a**3*exp(16*I* 
e) + 5*A*a**3*exp(14*I*e) + 10*A*a**3*exp(12*I*e) + 10*A*a**3*exp(10*I*e) 
+ 5*A*a**3*exp(8*I*e) + A*a**3*exp(6*I*e) - I*B*a**3*exp(16*I*e) - 3*I*B*a 
**3*exp(14*I*e) - 2*I*B*a**3*exp(12*I*e) + 2*I*B*a**3*exp(10*I*e) + 3*I*B* 
a**3*exp(8*I*e) + I*B*a**3*exp(6*I*e))/(32*c**8), True))
 
3.8.4.7 Maxima [F(-2)]

Exception generated. \[ \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^8} \, dx=\text {Exception raised: RuntimeError} \]

input
integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))^8,x, al 
gorithm="maxima")
 
output
Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati 
ve exponent.
 
3.8.4.8 Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 496 vs. \(2 (103) = 206\).

Time = 1.06 (sec) , antiderivative size = 496, normalized size of antiderivative = 3.91 \[ \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^8} \, dx=-\frac {2 \, {\left (105 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{15} + 525 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{14} - 105 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{14} - 2975 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{13} - 140 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{13} - 8750 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{12} + 1190 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{12} + 22365 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{11} + 1596 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{11} + 39235 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{10} - 4711 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{10} - 58075 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} - 4600 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} - 63300 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} + 7380 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} + 58075 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} + 4600 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} + 39235 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} - 4711 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} - 22365 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 1596 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 8750 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 1190 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 2975 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 140 i \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 525 i \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 105 \, B a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 105 \, A a^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{105 \, c^{8} f {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{16}} \]

input
integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))^8,x, al 
gorithm="giac")
 
output
-2/105*(105*A*a^3*tan(1/2*f*x + 1/2*e)^15 + 525*I*A*a^3*tan(1/2*f*x + 1/2* 
e)^14 - 105*B*a^3*tan(1/2*f*x + 1/2*e)^14 - 2975*A*a^3*tan(1/2*f*x + 1/2*e 
)^13 - 140*I*B*a^3*tan(1/2*f*x + 1/2*e)^13 - 8750*I*A*a^3*tan(1/2*f*x + 1/ 
2*e)^12 + 1190*B*a^3*tan(1/2*f*x + 1/2*e)^12 + 22365*A*a^3*tan(1/2*f*x + 1 
/2*e)^11 + 1596*I*B*a^3*tan(1/2*f*x + 1/2*e)^11 + 39235*I*A*a^3*tan(1/2*f* 
x + 1/2*e)^10 - 4711*B*a^3*tan(1/2*f*x + 1/2*e)^10 - 58075*A*a^3*tan(1/2*f 
*x + 1/2*e)^9 - 4600*I*B*a^3*tan(1/2*f*x + 1/2*e)^9 - 63300*I*A*a^3*tan(1/ 
2*f*x + 1/2*e)^8 + 7380*B*a^3*tan(1/2*f*x + 1/2*e)^8 + 58075*A*a^3*tan(1/2 
*f*x + 1/2*e)^7 + 4600*I*B*a^3*tan(1/2*f*x + 1/2*e)^7 + 39235*I*A*a^3*tan( 
1/2*f*x + 1/2*e)^6 - 4711*B*a^3*tan(1/2*f*x + 1/2*e)^6 - 22365*A*a^3*tan(1 
/2*f*x + 1/2*e)^5 - 1596*I*B*a^3*tan(1/2*f*x + 1/2*e)^5 - 8750*I*A*a^3*tan 
(1/2*f*x + 1/2*e)^4 + 1190*B*a^3*tan(1/2*f*x + 1/2*e)^4 + 2975*A*a^3*tan(1 
/2*f*x + 1/2*e)^3 + 140*I*B*a^3*tan(1/2*f*x + 1/2*e)^3 + 525*I*A*a^3*tan(1 
/2*f*x + 1/2*e)^2 - 105*B*a^3*tan(1/2*f*x + 1/2*e)^2 - 105*A*a^3*tan(1/2*f 
*x + 1/2*e))/(c^8*f*(tan(1/2*f*x + 1/2*e) + I)^16)
 
3.8.4.9 Mupad [B] (verification not implemented)

Time = 9.22 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.26 \[ \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^8} \, dx=\frac {-\frac {a^3\,\left (-2\,B+A\,20{}\mathrm {i}\right )}{210}+\frac {a^3\,\mathrm {tan}\left (e+f\,x\right )\,\left (50\,A-B\,16{}\mathrm {i}\right )}{210}+\frac {B\,a^3\,{\mathrm {tan}\left (e+f\,x\right )}^3\,1{}\mathrm {i}}{5}+\frac {a^3\,{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (49\,B+A\,35{}\mathrm {i}\right )}{210}}{c^8\,f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^8+{\mathrm {tan}\left (e+f\,x\right )}^7\,8{}\mathrm {i}-28\,{\mathrm {tan}\left (e+f\,x\right )}^6-{\mathrm {tan}\left (e+f\,x\right )}^5\,56{}\mathrm {i}+70\,{\mathrm {tan}\left (e+f\,x\right )}^4+{\mathrm {tan}\left (e+f\,x\right )}^3\,56{}\mathrm {i}-28\,{\mathrm {tan}\left (e+f\,x\right )}^2-\mathrm {tan}\left (e+f\,x\right )\,8{}\mathrm {i}+1\right )} \]

input
int(((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i)^3)/(c - c*tan(e + f*x)*1 
i)^8,x)
 
output
((a^3*tan(e + f*x)*(50*A - B*16i))/210 - (a^3*(A*20i - 2*B))/210 + (B*a^3* 
tan(e + f*x)^3*1i)/5 + (a^3*tan(e + f*x)^2*(A*35i + 49*B))/210)/(c^8*f*(ta 
n(e + f*x)^3*56i - 28*tan(e + f*x)^2 - tan(e + f*x)*8i + 70*tan(e + f*x)^4 
 - tan(e + f*x)^5*56i - 28*tan(e + f*x)^6 + tan(e + f*x)^7*8i + tan(e + f* 
x)^8 + 1))